home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / o-z / x-windows / mesa-amiwin / mklib.freebsd < prev    next >
Encoding:
Text File  |  1995-11-29  |  426 b   |  25 lines

  1. #!/bin/sh
  2.  
  3. # Make a FreeBSD shared library
  4. # contributed by Mark Diekhans <markd@grizzly.com>
  5.  
  6. # First argument is name of output library
  7. # Rest of arguments are object files
  8.  
  9. VERSION="12.5"
  10.  
  11. LIBRARY=$1
  12. shift 1
  13. OBJECTS=$*
  14.  
  15. BASENAME=`echo ${LIBRARY} | sed "s/\.a//g"`
  16. SHLIB=${BASENAME}.so.${VERSION}
  17. STLIB=${BASENAME}.a
  18.  
  19. rm -f ${SHLIB} ${STLIB}
  20.  
  21. ar cq ${STLIB} ${OBJECTS}
  22. ranlib ${STLIB}
  23. ld -Bshareable -o ${SHLIB} ${OBJECTS}
  24.  
  25.